package com.registration.controller;

import com.registration.entity.ResultEntity;
import com.registration.entity.YlDoctor;
import com.registration.server.YlDoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 医生搜索
 * */
@RestController
@RequestMapping("/doctor")
public class DoctorController {
    @Autowired
    YlDoctorService ylDoctorService;

   @GetMapping("/findAll/{id}")
   public ResultEntity<List<YlDoctor>> findAll(@PathVariable("id") int doctorId) {
        return new ResultEntity<List<YlDoctor>>(200,"查询详细",ylDoctorService.findAll(doctorId));
   }

    @GetMapping("/findAll/")
    public ResultEntity<List<YlDoctor>> findAllDo() {
        return new ResultEntity<List<YlDoctor>>(200,"查询详细",ylDoctorService.findAllDo());
    }
}
